package ru.ifmo.ctddev.krotkov.taskrunner;

public class MyTask <X, Y> {
	Task<X, Y> subj;
	X res;
	Y arg;
	volatile boolean ready;
	
	void execute() {
		res = subj.run(arg);
		ready = true;
	}
	
	MyTask(Task<X, Y> task, Y arg) {
		subj = task;
		this.arg = arg;
		res = null;
		ready = false;
	}
}
